package co.yixiang.mall.biz.user.controller;

import co.yixiang.common.core.annotation.AnonymousAccess;
import co.yixiang.common.log.annotation.Log;
import co.yixiang.mall.biz.user.service.UserBalanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author wxl
 * @Date 2021/3/19
 */
@Api(tags = "用户余额管理")
@RestController
@RequestMapping("/yxUserBalance")
public class UserBalanceController {

    @Autowired
    private UserBalanceService userBalanceService;

    @Log("用户余额明细查询")
    @ApiOperation(value = "用户余额明细查询")
    @AnonymousAccess
    @GetMapping(value = "/detail")
    public Map<String,Map<String,String>> balanceDetail(String uid){
        Map<String,Map<String,String>> map = userBalanceService.balanceDetail(uid);
        return map;
    }
}
